/* eslint-disable @typescript-eslint/no-empty-object-type */
/* eslint-disable @typescript-eslint/consistent-indexed-object-style */
export type ServiceDescription = {
  [k: string]: { request: {}; response: unknown | undefined };
};

export type CreateServicesDescription<T extends ServiceDescription> = T;

export type ServiceToSyncObj<T extends ServiceDescription, TContext = {}> = {
  [K in keyof T]: (args: T[K]["request"] & TContext) => T[K]["response"];
};

export type ServiceToAsyncObj<T extends ServiceDescription, TContext = {}> = {
  [K in keyof T]: (
    args: T[K]["request"] & TContext,
  ) => Promise<T[K]["response"]>;
};
